package com.liu.test.common;

public class ListResponse<T> {
    String msg;

    T result;

    int count;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public T getResult() {
        return result;
    }

    public void setResult(T result) {
        this.result = result;
    }

    public int getCount() {
        return count;
    }

    public void setCount(int count) {
        this.count = count;
    }

    // Build 模式
    public ListResponse count(int count) {
        this.setCount(count);
        return this;
    }

    public ListResponse count(Long count) {
        this.setCount(count.intValue());
        return this;
    }

    public ListResponse msg(String msg) {
        this.setMsg(msg);
        return this;
    }

    public ListResponse result(T result) {
        this.setResult(result);
        return this;
    }
}
